<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!--jstl标签  -->
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">

<title>form.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
</head>
<body>
	<center>
		<h1>Hello Jfinal,form.jsp</h1>
	</center>
	<!-- <form action="user/submit" method="post"> -->
	<form action="${user==null?'user/submit': 'user/update'}" method="post">
		<input type="hidden" name="user.id" value="${user.id }" /> <label>姓名</label><input
			type="text" name="user.name" value="${user.name }" /> <label>年龄</label><input
			type="text" name="user.age" value="${user.age }" /> <label>性别</label>
		<input type="radio" name="user.sex"
			<c:if test="${user!=null && user.sex==1}"> checked="checked" </c:if>
			value="1" />男 <input type="radio" name="user.sex"
			<c:if test="${user!=null && user.sex==2}"> checked="checked" </c:if>
			value="2" />女 <label>备注信息</label>
		<textarea rows="" cols="" name="user.remark">${user.remark }</textarea>
		<!-- 多行文本框 -->
		<input type="submit" value="提交" />
	</form>
</body>
</html>